cmake_minimum_required(VERSION 3.4.1)

add_subdirectory(${CMAKE_SOURCE_DIR}/librtmp)
include_directories(${CMAKE_SOURCE_DIR}/include)

set(lib_path ${CMAKE_SOURCE_DIR}/../../../libs/${ANDROID_ABI})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${lib_path}")
#file(GLOB c_path ${CMAKE_SOURCE_DIR}/*.c)

add_library( # Sets the name of the library.
        native-lib
        SHARED
        native-lib.cpp
        VideoChannel.cpp
        AudioChannel.cpp)

find_library( # Sets the name of the path variable.
        log-lib
        log)

target_link_libraries( # Specifies the target library.
        native-lib
        rtmp
        ${log-lib}
        x264
        faac)